package cn.kgc.mushroomdatabaseprovider.controller;

import cn.kgc.mushroomcommon.pojo.Commodity;
import cn.kgc.mushroomcommon.pojo.Common;
import cn.kgc.mushroomdatabaseprovider.service.CommonService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;
@RestController
@RequestMapping("/common")
public class CommonController {
    @Resource
    CommonService commonService;

    @RequestMapping("/selectCommon")
    public List<Common> selectCommon(@RequestParam("id")Integer id) {
        List<Common> commons = commonService.selectCommon(id);
        return commons;
    }

}
